﻿@model GYMONE.Models.AssignRoleVM

@{
    ViewBag.Title = "RoleAddToUser";
}


<script src="~/Scripts/jquery-1.11.1.js"></script>
<script src="~/Scripts/jquery-ui.min.js"></script>
<link href="~/Scripts/jquery-ui.min.css" rel="stylesheet" />
<script src="~/bootstrap/js/bootstrap.min.js"></script>
<link href="~/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="~/Content/Site.css" rel="stylesheet" />




<div class="container">

    <div class="logo col-sm-12 text-center col-md-12 ">
        <img alt="" src="~/Images/dotnetsai.png" />
    </div>

    <div class="clearfix"></div>


    @using (Html.BeginForm("RoleAddToUser", "Account"))
    {
        @Html.AntiForgeryToken()
        @Html.ValidationSummary(true)
        
        if (ViewBag.ResultMessage != null)
        {
        <div class="alert alert-success" style="float: none;" role="alert">@ViewBag.ResultMessage</div>
        }
        <fieldset>
            <legend class="legend">Assign Role to User</legend>
            <div class="panel">

                <div class="panel-body">

                    <div>
                        @Html.ActionLink("Create New Role", "RoleCreate", "Account", new { @class = "btn btn-info btn-pressure" }) |
                         @Html.ActionLink("All User roles", "DisplayAllUserroles", "Account", new { @class = "btn btn-info btn-pressure" })
                    </div>
                 <br />
                    <div class="col-md-6 col-sm-6">
                        <div class="form-group">
                            <div class="col-md-6 col-sm-6">
                                @Html.Label("User Name")
                            </div>
                            <div class="col-md-6 col-sm-6">
                                @Html.DropDownListFor(m => m.UserName, new SelectList(Model.Userlist, "Value", "Text"),
                 new { @class = "form-control" })
                                @Html.ValidationMessageFor(m => m.UserName)

                            </div>

                        </div>
                    </div>
                    <div class="col-md-6 col-sm-6">
                        <div class="form-group">
                            <div class="col-md-6 col-sm-6">
                                @Html.Label("Role Name")
                            </div>
                            <div class="col-md-6 col-sm-6">
                                @Html.DropDownListFor(m => m.RoleName, new SelectList(Model.RolesList, "Value", "Text"), new { @class = "form-control" })
                                @Html.ValidationMessageFor(m => m.RoleName)

                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-12">
                            <input id="Submit" class="btn btn-success" type="submit" value="Save" />
                            @Html.ActionLink("Cancel", "DisplayAllUserroles", "Account", new  {  @class="btn btn-success"})
                        </div>
                    </div>



                </div>
            </div>
        </fieldset>
    }
</div>




